<?php 

class Hash
{
	
	/**
	* 
	* @param string $algo loai ma hoa (md5,sha1, whirlpool, ect) 
	* @param string $data Du lieu can ma hoa
	* @param string $salt key de ma hoa
	* return string chuoi ma hoa
	*/
	public static function create($algo, $data, $salt)
	{
		$context = hash_init($algo, HASH_HMAC, $salt);
		hash_update($context, $data);

		return hash_final($context);
	}
}


?>